package com.jinhongone.pattern.structure.decorator;

/*
* 快餐类(原有对象（被装饰者的）抽象)：抽象构件角色
* */
public abstract class FirstFood {
    //价格
    private float price;
    //描述
    private String desc;

    //计算成分的抽象方法
    public abstract float cost();

    public FirstFood() {
    }
    //抽象类不能直接new对象，但可以创建构造函数，方便子类调用对属性进行赋值
    public FirstFood(float price, String desc) {
        this.price = price;
        this.desc = desc;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    public String getDesc() {
        return desc;
    }



    public void setDesc(String desc) {
        this.desc = desc;
    }
}
